package com.hello.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hello.common.core.annotation.Excel;
import com.hello.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户信件对象 sd_letters
 * 
 * @author hello
 * @date 2025-05-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Letters extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 信件ID，主键，自增 */
    private Long letterId;

    /** 用户ID，关联系统用户表 */
    @Excel(name = "用户ID，关联系统用户表")
    private Long userId;

    /** 信件标题 */
    @Excel(name = "信件标题")
    private String title;

    /** 信件内容，不能为空 */
    @Excel(name = "信件内容，不能为空")
    private String content;

    /** 信件模式：电子信、纸质信或公开信 */
    @Excel(name = "信件模式：电子信、纸质信或公开信")
    private String letterMode;

    /** 使用的信笺模板ID */
    @Excel(name = "使用的信笺模板ID")
    private Long stationeryTemplateId;

    /** 收件人姓名 */
    @Excel(name = "收件人姓名")
    private String recipientName;

    /** 收件人邮箱（电子信件使用） */
    @Excel(name = "收件人邮箱", readConverterExp = "电=子信件使用")
    private String recipientEmail;

    /** 信件状态 */
    @Excel(name = "信件状态")
    private String status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    /** 发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date sentAt;

    /** 公开信是否匿名发布 */
    @Excel(name = "公开信是否匿名发布")
    private Integer isAnonymousPublicPost;

    public void setLetterId(Long letterId) 
    {
        this.letterId = letterId;
    }

    public Long getLetterId() 
    {
        return letterId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setLetterMode(String letterMode) 
    {
        this.letterMode = letterMode;
    }

    public String getLetterMode() 
    {
        return letterMode;
    }
    public void setStationeryTemplateId(Long stationeryTemplateId) 
    {
        this.stationeryTemplateId = stationeryTemplateId;
    }

    public Long getStationeryTemplateId() 
    {
        return stationeryTemplateId;
    }
    public void setRecipientName(String recipientName) 
    {
        this.recipientName = recipientName;
    }

    public String getRecipientName() 
    {
        return recipientName;
    }
    public void setRecipientEmail(String recipientEmail) 
    {
        this.recipientEmail = recipientEmail;
    }

    public String getRecipientEmail() 
    {
        return recipientEmail;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }
    public void setSentAt(Date sentAt) 
    {
        this.sentAt = sentAt;
    }

    public Date getSentAt() 
    {
        return sentAt;
    }
    public void setIsAnonymousPublicPost(Integer isAnonymousPublicPost) 
    {
        this.isAnonymousPublicPost = isAnonymousPublicPost;
    }

    public Integer getIsAnonymousPublicPost() 
    {
        return isAnonymousPublicPost;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("letterId", getLetterId())
            .append("userId", getUserId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("letterMode", getLetterMode())
            .append("stationeryTemplateId", getStationeryTemplateId())
            .append("recipientName", getRecipientName())
            .append("recipientEmail", getRecipientEmail())
            .append("status", getStatus())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("sentAt", getSentAt())
            .append("isAnonymousPublicPost", getIsAnonymousPublicPost())
            .toString();
    }
}
